Home:ALL Converter>Concourse merge another branch

Concourse merge another branch

Ask Time:2018-11-20T03:38:40         Author:AdminTome

Json Formatter

I'm trying to automate deployments using Concourse-CI.

I have a go application that is checked into a local Gitlab with two branches (master and develop).

I have a pipeline setup for the develop branch that runs go unit tests and if they pass i want to automatically merge the changes from the develop branch to the master branch and tag it with the latest version.

Here is what I have so far:

jobs:
- name: run-unit-tests
  public: true
  plan:
  - get: source-master
  - get: source
    trigger: true
  - put: discord
    params:
      channel: "((channel_id))"
      color: 6076508
      title: Concourse CI
      message: |
        Starting Unit tests for manageGameData
  - task: task-unit-tests
    file: source/ci/tasks/task-unit-tests.yml
    on_success:
      do:
        - put: discord
          params:
            channel: "((channel_id))"
            color: 6076508
            title: Concourse CI
            message: |
              All Unit tests passed for manageGameData
        - put: version
          params: 
            bump: minor
        - get: version
        - put: source-master
          params:
            merge: source
            repository: source-master
            tag: version/number

The problem is that this only tags the master branch with the new version.

Is there a way to merge the develop branch to master?

Author:AdminTome,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/53381510/concourse-merge-another-branch
AdminTome :

I guess i didn't understand the documentation at first but the answer was pretty easy.\n\n- get: source-master\n- get: source\n- put: source-master\n params:\n repository: source\n\n\nFirst you have to get both branches in this case master and develop. Then you push the source local repo (a folder on the concourse worker) to master by using put.\n\nThere is no need for the merge parameter and i had the wrong repository parameter.\n\nHope this helps someone else.",
2018-11-21T14:56:57
yy